package practice;

import java.util.Scanner;

public class _字符串字母反转_ {
    public static void main(String[] args) {
        _字符串字母反转_ c = new _字符串字母反转_();
        Solution s = c.getSolution();
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
//        String input = "hello";
        String res = s.change(input);
        System.out.println(res);
    }

    public Solution getSolution() {
        return new Solution();
    }

    class Solution {
        public String change(String string) {
            int head = 0;
            int tail = string.length() - 1;
            StringBuffer res = new StringBuffer(string);
            /*StringBuffer r = new StringBuffer("hello");
            System.out.println(r.charAt(0));
            r.deleteCharAt(1);
            System.out.println(r);
            r.insert(1,'w');
            System.out.println(r);*/
            while (head != tail) {
                if (noChar(res.charAt(head))) head++;
                if (noChar(res.charAt(tail))) tail--;
                char char_head = res.charAt(head);
                char char_tail = res.charAt(tail);
//                char temp = res.charAt(head);
                res.deleteCharAt(head);
                res.insert(head, char_tail);
                res.deleteCharAt(tail);
                res.insert(tail, char_head);
            }
            return res.toString();
//            return null;
        }

        public boolean noChar(char c) {
            return c < 'a' || c > 'z';
        }
    }

}
